package serverManger;

import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

import serverInstallation.InstallServer;
import connections.JettyManager;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//redirection of error and output to a log
		//try {
			/*PrintStream err = new PrintStream(new BufferedOutputStream(new FileOutputStream("errLog.txt")));
			PrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream("outLog.txt")));
			System.setOut(out);
			System.setErr(err);*/

			InstallServer.openGUI();
			JettyManager jettyManager = new JettyManager();
			Thread t = new Thread(jettyManager);
			t.start(); 
			Server server = Server.getServerInst();
			server.setJettyManager(jettyManager);
			server.start();
			/*err.close();
			out.close();*/
		/*} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
	}

}